package com.xinsoft.entity.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.xinsoft.entity.po.FmsAccountsPay;
import com.xinsoft.entity.po.SysFileHis;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 采购订单
 * @TableName scm_purchase
 */
@Data
public class ScmPurchaseVo implements Serializable {

    /**
     * 主键ID
     */
    protected Integer id;

    /**
     * 供应商ID
     */
    private Integer supplierId;

    /**
     * 供应商名称
     */
    private String supplierName;

    /**
     * 编码
     */
    private String purchaseCode;

    /**
     * 审批状态 默认0暂存, 1:已提交(审批中), 2:驳回, 3:审核通过
     */
    private String approveStatus;

    /**
     * 采购员id
     */
    private Integer purchasePersonId;

    /**
     * 采购员name
     */
    private String purchasePersonName;

    /**
     * 采购部门id
     */
    private Integer deptId;

    /**
     * 采购部门name
     */
    private String deptName;

    /**
     * 优惠折扣率
     */
    private BigDecimal discountAmount;

    /**
     * 减免金额
     */
    private BigDecimal discountRate;

    /**
     * 合同类型
     */
    private Integer contractType;

    /**
     * 合同日期
     */
    private Date contractDate;

    /**
     * 合同有效期
     */
    private Date contractEffectiveDate;

    /**
     * 合同编号
     */
    private String contractCode;

    /**
     * 供应商合同编号
     */
    private String supplierContractCode;

    /**
     * 联系电话
     */
    private String companyPhone;

    /**
     * 备注
     */
    private String remark;

    /**
     * 订单总额
     */
    private BigDecimal payAmount;

    /**
     * 开票总额
     */
    private BigDecimal invoicedAmount;

    /**
     * 详情
     */
    @TableField(exist = false)
    private List<ScmPurchaseItemVo> itemList;

    /**
     * 详情
     */
    @TableField(exist = false)
    private List<FmsAccountsPay> fmsAccountsReceivableList;

    /**
     * 附件
     */
    @TableField(exist = false)
    private List<SysFileHis> sysFileHisList;


    /**
     * 审批历史记录
     */
    @TableField(exist = false)
    List<Map<String, Object>> scmApproveHisList;

    private static final long serialVersionUID = 1L;

}